# method_property
class Family:
    num = 0
    @classmethod
    def set_num(cls, amount):
        cls.num += amount

    def __init__(self, name, balance):
        self.name = name
        self.balance = balance
    def get_info(self):
        print(f'{self.name} -Family: {self.balance}')

f1 = Family('xiaoming', 6000)
print(f1.name, f1.balance)
f1.get_info()

Family.set_num(2550)
print(Family.num)

